package org.goldfish.demo.multifrontend.messageboard.mobile.model

import java.time.LocalDateTime
import java.util.Date

// For the request body of POST /api/messages
data class AddMessageRequest(
    val id: Long? = null,
    val content: String,
    val time: LocalDateTime? = null,
    val user: MessageBoardUser? = null
)

// For the response body of POST /api/messages
data class AddedMessageResponse(
    val id: Long?,
    val content: String,
    val time: LocalDateTime?,
    val user: MessageBoardUser?
)

// Represents the MessageView schema from the API (for GET requests)
data class MessageView(
    val id: Long,
    val senderId: Long,
    val sender: String,
    val message: String,
    val time: LocalDateTime
)

// Represents the LoginReq schema from the API
data class LoginReq(
    val username: String,
    val password: String
)

// Represents the MessageBoardUser schema from the API (without password)
data class MessageBoardUser(
    val id: Long,
    val username: String
)

// Represents the SseEmitter schema from the API
data class SseEmitter(
    val timeout: Long? = null
)
data class JwtInfo(
    val username: String,
    val expiration: Date
)
